package cn.edu.pku.ss.situationawareperceiver;

import org.alljoyn.bus.annotation.Position;

import cn.edu.pku.ss.situationawareperceiver.ContextConstants.ContextType;

public class ContextData {
	/**
	 * This class contains the real context without any meta-data.
	 *
	 */
	
	@Position(0)
	public int	contextTypeInt;
	
	@Position(1)
	public String 	truthValue;
	
	@Position(2)
	public long 	genDate;	//records the generated date of this context object 
	
	@Position(3)
	public long	expireDate;	//records the expire date of this context object
	

	
//	public ContextData(ContextType contextType, String truthValue,
//			String genDate, String expireDate) {
//		super();
//		this.contextType = contextType.ordinal();
//		this.truthValue = truthValue;
//		this.genDate = genDate;
//		this.expireDate = expireDate;
//	}
	
	public void initialize(ContextType contextType, String truthValue,
			long genDate, long expireDate) {
		this.contextTypeInt = contextType.ordinal();
		this.truthValue = truthValue;
		this.genDate = genDate;
		this.expireDate = expireDate;
	}
	
}
